//
//  Aspect-xxptmobile.m
//  CocoaPodsExampleProject
//
//  Created by KwokChun Cheung on 15/9/1.
//  Copyright (c) 2015年 eenet. All rights reserved.
//

#import "AppDelegate.h"
#import "XAspect.h"
#import "xxptmobile.h"
#import "HomeTabBarController.h"


#define AtAspect ExampleProject
#define AtAspectOfClass AppDelegate

@classPatchField(AppDelegate)
AspectPatch(-, BOOL, application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions){
    
    [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];
    
    [[UINavigationBar appearance] setBarTintColor:[UIColor colorWithRed:38/255.f green:109/255.f blue:191/255.f alpha:1]];
    [[UINavigationBar appearance] setTintColor:[UIColor whiteColor]];
    
    [[UITabBar appearance] setTintColor:[UIColor colorWithRed:38/255.f green:109/255.f blue:191/255.f alpha:1]];
    [[UINavigationBar appearance] setTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor whiteColor], NSFontAttributeName:[UIFont systemFontOfSize:18]}];
    
    self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
    self.window.backgroundColor = [UIColor whiteColor];
    
    HomeTabBarController *centerNav = [[HomeTabBarController alloc] init];
    self.window.rootViewController = centerNav;
    [self.window makeKeyAndVisible];
    
    
    return XAMessageForward(application:application didFinishLaunchingWithOptions:launchOptions);
}
@end
#undef AtAspectOfClass
#undef AtAspect